package ict.kth.se.exceptions;

/*
 * This exception is thrown when we try to create object that already exists in DB
 */
public class EntityAlreadyExistsInDBException extends Exception{
	
	private static final long serialVersionUID = 1L;
	//An string to write out when exception is reached
    private String outMessage = "Entity already exists in database";

    /**
     * Constructor without parameters
     */
    public EntityAlreadyExistsInDBException() {
    }

    
    /**
     * Constructor with parameter Message
     * @param message
     */
    public EntityAlreadyExistsInDBException(String message) {
    	super(message);
    }

    /**
     * Creates one message that is to be sent to the view
     *
     * @return               An message String
     */
    public String getMessage(){
        return outMessage;
    }
	
}
